#ifndef Algebra_MpiDataType_h
#define Algebra_MpiDataType_h

#include "AlgebraModule.h"
#include "mpi.h"

SG_NAMESPACE_OPEN
namespace Algebra
{
    /** 
     * Simplify the interfaces for MPI routines 
     * 
     */ 

    /// Helper struct to convert a C++ type to an MPI type
    template <typename TDataType>
    struct MpiDataType;

    // Explicitly specialize MpiDataType
    template <>
    struct MpiDataType<int>
    {
        static ALGEBRA_EXPORT const MPI_Datatype mpi_type;
    };

    template <>
    struct MpiDataType<float>
    {
        static ALGEBRA_EXPORT const MPI_Datatype mpi_type;
    };
    template <>
    struct MpiDataType<double>
    {
        static ALGEBRA_EXPORT const MPI_Datatype mpi_type;
    };
}  // namespace Algebra

SG_NAMESPACE_CLOSE

#endif  //  Algebra_MpiDataType_h